//
//  FZQTempViewController.swift
//  FZQSinLangWeiBo
//
//  Created by fuzhiqiang on 17/1/17.
//  Copyright © 2017年 fzq. All rights reserved.
//

import UIKit

class FZQTempViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        setupUI()
    }

    //设置视图
    private func setupUI(){
        view.backgroundColor = FZQrandomColor()
        setNav()
    }
    //设置导航条
    private func setNav(){
       title = "第\(navigationController?.childViewControllers.count ?? 0)"
        //设置右侧按钮
        navigationItem.rightBarButtonItem = UIBarButtonItem(imageName: nil, title: "PUSH", target: self, action: #selector(rightClick))
    }
    //按钮点击方法
    @objc private func rightClick(){
        print("右侧点了一下")
        let temvc = FZQTempViewController()
        navigationController?.pushViewController(temvc, animated: true)
        
    }
}
